public class PiEstimation {
    public static double m(int i) {
        double sum = 0.0;
        for (int j = 1; j <= i; j++) {
            sum += Math.pow(-1, j + 1) / (2 * j - 1);
        }
        return 4 * sum;
    }

    public static void main(String[] args) {
        System.out.println("i\tm(i)");
        for (int i = 100; i <= 900; i += 100) {
            System.out.printf("%d\t%.4f\n", i + 1, m(i + 1));
        }
    }
}